Experience Implementing a Performant Category-Theory Library in Coq

نویسندگان

  • Jason Gross
  • Adam Chlipala
  • David I. Spivak
چکیده

We describe our experience implementing a broad categorytheory library in Coq. Category theory and computational performance are not usually mentioned in the same breath, but we have needed substantial engineering effort to teach Coq to cope with large categorical constructions without slowing proof script processing unacceptably. In this paper, we share the lessons we have learned about how to represent very abstract mathematical objects and arguments in Coq and how future proof assistants might be designed to better support such reasoning. One particular encoding trick to which we draw attention allows category-theoretic arguments involving duality to be internalized in Coq’s logic with definitional equality. Ours may be the largest Coq development to date that uses the relatively new Coq version developed by homotopy type theorists, and we reflect on which new features were especially helpful.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Category Theory in Coq 8.5

We report on our experience implementing category theory in Coq 8.5 . The repository of this development can be found at https://bitbucket.org/amintimany/ categories/. This implementation most notably makes use of features primitive projections for records and universe polymorphism that are new to Coq 8.5. The latter provides relative smallness and largeness in the development. This will be ela...

متن کامل

Categorical semantics of programming languages (in COQ)

Formalized mathematics have met an increasing interest in the last years. They give a way to build digital searchable libraries of mathematics, and computerverified proofs allow for a level of trust in the theory which the pen and paper versions cannot supply. Our first goal is to build a library of category theory [2] in the proof assistent COQ [1]. A comprehensive library surely demands more ...

متن کامل

Pragmatic Quotient Types in Coq

In intensional type theory, it is not always possible to form the quotient of a type by an equivalence relation. However, quotients are extremely useful when formalizing mathematics, especially in algebra. We provide a Coq library with a pragmatic approach in two complementary components. First, we provide a framework to work with quotient types in an axiomatic manner. Second, we program constr...

متن کامل

Developing the Algebraic Hierarchy with Type Classes in Coq

We present a new formalization of the algebraic hierarchy in Coq, exploiting its new type class mechanism to make practical a solution formerly thought infeasible. Our approach addresses both traditional challenges as well as new ones resulting from our ambition to build upon this development a library of constructive analysis in which abstraction penalties inhibiting efficient computation are ...

متن کامل

Initial Semantics for higher-order typed syntax in Coq

Initial Semantics aims at characterizing the syntax associated to a signature as the initial object of some category. We present an initial semantics result for typed syntax with variable binding together with its formalization in the Coq proof assistant. The main theorem was first proved on paper in the second author’s PhD thesis in 2010, and verified formally shortly afterwards. To a simply–t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014